package na.learn.java.simpleprogs;

import java.util.Hashtable;
import java.util.Properties;

public class TestInheritance extends Hashtable {

	public Object put(Object key, Object value) {
		super.put(key + "s", value);
		return super.put(key, value);
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Properties defaults = new Properties();
		defaults.put("color", "black");

		Properties props = new Properties(defaults);

		System.out.println(props.get("color") + ", "
				+ props.getProperty("color"));
		//		 This prints "null, black"

		TestInheritance test = new TestInheritance();
		for (int count = 0; count < 1000; count++) {
			test.put("dog" + "s", "hello");
			if (!"hello".equals(test.get("dogs")))
				System.out.println("dogs");
		}

	}

}
